﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.ProcessManager.Entity;
using System.ComponentModel;

namespace PSE.ProcessManager.ResourceAccess
{
    public interface IProcessManagerResourceAccess
    {
        //Metodos utilizados pelo COnfigurador
        List<ProcessEntity> RetrieveProcessList();
        List<InteligenceModuleEntity> RetrieveInteligenceModules();
        List<MessageEntity> RetrieveMessageList(int? processId);
        void SaveProcess(ProcessEntity process);
        void DeleteMessage(int messageId);

        //Metodos utilizados pelo Server
        List<int> RetrieveAutoStartProcesses();
        void RetrieveInteligenceModuleAndProcessConfiguration(int processId, out ProcessEntity processConfiguration, out InteligenceModuleEntity inteligenceModuleConfiguration);
        ProcessEntity RetrieveProcessConfiguration(int processId);

        //Metodos do Log utilizados pelo Server / Client
        List<LogEntity> RetrieveLogList(int processId);
        LogEntity RetrieveLastProcessLog(int processId);
        int SaveLog(int processId, string userName, DateTime startDate);
        void SaveLog(int idLog, DateTime endDate);
        void SaveLog(int idLog, DateTime endDate, string errorMessage);
    }
}
